<div class="modal" id="addCategoryModal">
	<div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
          <h4 class="modal-title">Új kategória felvétele</h4>
        </div>
		
        <div class="modal-body">
            <form role="form" action="/smaragd/admin/addcategory" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="productName">Kategória neve</label>
                    <input type="text" name="category" class="form-control" id="categoryName" placeholder="Az új kategória neve" required>
                </div>
                
                <label for="productPrice">Szülő kategória</label>
                <select class="form-control" name="parent_id" required>
                    <?php
					echo '<option value="NULL" data-name="Fő kategória">' . "### Főkategória ###" . '</option>';		
                    foreach( $products_model->getCategories() as $category)	{
                       echo '<option value="' . $category->id . '" data-name="' . $category->name  . '">' . $category->name . '</option>';						
                    }
                    ?>
                </select>
                
                <button id="addCategorySubmit" type="submit" class="btn btn-default" style="display:none">Submit</button>  
            </form>
        </div>
		
        <div class="modal-footer">
          <a href="#" data-dismiss="modal" class="btn">Mégsem</a>
          <a href="#" class="btn btn-primary" onclick="$('#addCategorySubmit').click();">Hozzáad</a>
        </div>
      </div>
    </div>
</div>